﻿@model RIS.TMP.WEB.APP.Models.CFEmployee

@{
    ViewBag.Title = "Edit";
}
@section Settings{
<h2 class="sub-header">แก้ไขข้อมูลผู้ใช้งาน</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
<div class="row placeholders">
  <form class="form-horizontal well">
    <fieldset>
        @Html.HiddenFor(model => model.EmId)
        @Html.HiddenFor(model => model.RecordStatus)
        @Html.HiddenFor(model => model.CreateWhen)
        @Html.HiddenFor(model => model.CreateBy)
        @Html.HiddenFor(model => model.UpdateWhen)
        @Html.HiddenFor(model => model.UpdateBy)
            <hr>
            <div class="editor-label">
                รหัสพนักงาน
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.EmCode)
                @Html.ValidationMessageFor(model => model.EmCode)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.FirstName_Th)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.FirstName_Th)
                @Html.ValidationMessageFor(model => model.FirstName_Th)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.FirstName_Eg)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.FirstName_Eg)
                @Html.ValidationMessageFor(model => model.FirstName_Eg)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.SurName_Th)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.SurName_Th)
                @Html.ValidationMessageFor(model => model.SurName_Th)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.SurName_Eg)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.SurName_Eg)
                @Html.ValidationMessageFor(model => model.SurName_Eg)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Telephone)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Telephone)
                @Html.ValidationMessageFor(model => model.Telephone)
            </div>

            <div class="editor-label">
                ตำแหน่ง
            </div>
            <div class="editor-field">
                @Html.DropDownList("DsId", "เลือกตำแหน่ง")
                @Html.ValidationMessageFor(model => model.DsId)
            </div>

            <div class="editor-label">
                เพศ
            </div>
            <div class="editor-field">
                @Html.DropDownList("GenderId", new List<SelectListItem>
                    {
                        new SelectListItem { Text = "ชาย", Value = "1"},
                        new SelectListItem { Text = "หญิง", Value = "2"}
                    }, "เลือกเพศ")

                @Html.ValidationMessageFor(model => model.GenderId)
            </div>
            
            <div class="editor-label">
                สาขา
            </div>
            <div class="editor-field">
                @Html.DropDownList("BrId", "เลือกสาขา")
                @Html.ValidationMessageFor(model => model.BrId)
            </div>

            <div class="editor-label">
                กลุ่มผู้ใช้งาน
            </div>
            <div class="editor-field">
                @Html.DropDownList("GPMId", "เลือกกลุ่มผู้ใช้งาน")
                @Html.ValidationMessageFor(model => model.GPMId)
            </div>

            <div class="editor-label">
                เพิ่มเติม
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Remarks)
                @Html.ValidationMessageFor(model => model.Remarks)
            </div>
            <hr>
            <p>
                <input type="submit" class="btn btn-primary" value="บันทึก" />
                @Html.ActionLink("กลับไปยังรายการ", "Index", new object { }, new { @class = "btn btn-primary" })
            </p>
    </fieldset>
      </form>
    </div>
}
    }
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    <script type="text/javascript">
        $(".AF").show();
    </script>
}
